{extends file="./main.tpl"}
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
{block name=head}
  <link href="./css/jquery.autocomplete.css" rel="stylesheet" type="text/css" />
  <link href="./css/loan.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript" src="./js/jquery-1.5.2.min.js"></script>
  <script type="text/javascript" src="./js/jquery.autocomplete.pack.js"></script>
  <script type="text/javascript" src="./js/script.js"></script>		
  <script type="text/javascript" src="./js/loan.js"></script>		
{/block}
{block name=body}
<form name="loanForm" id="loanForm" action="{$smarty.server.PHP_SELF}" method="post" enctype="multipart/form-data">
  <table cellpadding="2" cellspacing="0" border="0" align="center">
    <tr>
      <td align="right" valign="top" >
  	    <table cellpadding="2" cellspacing="0" border="1">
  	      <tr>
  	        <td colspan="2" align="center">
  	        	<h1><font size="6px">Loan Entry</font></h1>
  	        	<span style="color:red">{$msg}</span>
  	        </td>
  	      </tr>
  	      <tr>
            <th align="right"> Take Image : &nbsp</th>
            <td>&nbsp<a href="webcam/web.html"> <font size="4px">Take Image</font></a></td>
          </tr>
  	      <tr>
            <th align="right">Party : &nbsp</th>
            <td>
              &nbsp<select name="partyNameSel" id="partyNameSel" autofocus="autofocus" onchange="findGuaranterId(this);">
                <option selected=selected value="0">&nbsp&nbsp&nbsp --- New Party --- &nbsp&nbsp&nbsp  </option>
                {html_options values=$arrParty.partyId  output=$arrParty.partyName }
              </select>
            </td>
          </tr>
          <tr>
            <th align="right">Value : &nbsp</th>
            <td>&nbsp<input type="text" name="value" id="value1" size="24" placeholder="Value" onblur="loanamount();"></td>
          </tr>
          <tr>
            <th align="right">Loan Amount : &nbsp</th>
            <td>&nbsp<input type="text" required=required size="24" name="loadAmount" id="loanAmount" onblur="countDays();" placeholder="Enter Loan Amount"></td>
          </tr>
          <tr>
            <th align="right">Item : &nbsp</th>
            <td>&nbsp<input type="text" required=required size="24" class="capital" name="item" id="item" autocomplete="off" onblur="setItemGuj(this);"></td>
          </tr>
          <tr>
            <th align="right">Weight : &nbsp</th>
            <td>&nbsp<input type="text" required=required size="24" name="weight" id="123" ></td>
          </tr>
          <tr>
            <th align="right">Item Image : &nbsp</th>
            <td>&nbsp<input type="file" name="file" id="file" ></td>
          </tr>
          <tr>
            <th align="right">Item Location : &nbsp</th>
            <td>&nbsp<input type="text" required=required size="24" name="itemLocation" class="capital" id="itemLocation" ></td>
          </tr>
          <tr>
            <th align="right">Date : &nbsp</th>
            <td>&nbsp{html_select_date prefix='curDate' field_order="DmY" month_format="%m" start_year='-5' end_year='+5' time=$today|date_format:"%d-%m-%Y" day_value_format="%02d"}</td>
          </tr>
          <tr>
            <th NOWRAP align="right">Last Insterest Record : &nbsp</th>
            <td>&nbsp{html_select_date prefix='lastInstRec' field_order="DmY" month_format="%m" start_year='-5' end_year='+5' time=$today|date_format:"%d-%m-%Y" day_value_format="%02d"}</td>
          </tr>
          <tr>
            <th NOWRAP  align="right">Monthly Interest % : &nbsp</th>
            <td>&nbsp<input type="text" name="monthlyInterest" size="24" id="monthlyInterest" onblur="interest();"></td>
          </tr>
          <tr>
            <th NOWRAP align="right">Monthly Interest Rs : &nbsp</th>
            <td>&nbsp<input type="text" name="monthlyInterestRs" size="24" id="monthlyInterestRs""></td>
            <input type="hidden" name="loanVar" id="loanVar"">
          </tr>
        </table> 
      </td>
      <td align="left" valign="top" class="partyData"></td>
    </tr>
    <tr>
      <td colspan="2">
        <input type="reset" name="reset" id="reset" value="Reset">
        <input type="submit" name="loanBtn" id="loanBtn" value="Save">
      </td>
    </tr>
  </table>
</form> 
{/block}